import { createStore } from 'vuex'

 const store = createStore({
  state: {
    //创建用户对象
    user:{}
  },
  getters: {
  },
  mutations: {
    //提供外部调用方法存储用户信息
    setUser(state,user){
      state.user = user;
    }
  },
  actions: {
  },
  modules: {
  }
}) //对外暴露
export default store;